<template>
	<view class="my">
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		computed: {
		},
        onLoad() {
		    if(uni.getStorageSync('storage_name')){
                uni.switchTab({
                    url: '/pages/example/components'
                })
            }else{
                uni.redirectTo({
                    url: '/pages/login'
                })
            }
        },
		onShow() {
		},
		created() {

		},
		methods: {
            loginTap(){
                uni.removeStorageSync('storage_name');
                uni.removeStorageSync('storage_token');
                this.$refs.uToast.show({
                    title: '退出成功',
                    type: 'success'
                })
                setTimeout(()=>{
                    uni.navigateTo({
                        url: '/pages/login'
                    })
                },1000)
            }
		}
	}
</script>

<style>
	/* page {
		background-color: rgb(240, 242, 244);
	} */
</style>

<style lang="scss" scoped>
    .my{
        .myInfo{
            display: flex;
            align-items: center;
            padding: 32rpx;
            font-size: 42rpx;
            font-weight: bold;
            color: #262626;
        }
        .loginLogo{
            width: 96rpx;
            height: 96rpx;
            margin-right: 52rpx;
        }
        /*height: 100%;*/
        .loginButton{
            background: #0F81FF;
            border-radius: 24rpx;
            height: 96rpx;
            line-height: 96rpx;
            text-align: center;
            width: 85%;
            margin: 134rpx auto 0;
            font-size: 36rpx;
            font-weight: bold;
            color: #FFFFFF;
        }
    }
</style>
